<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 1px solid black;
      margin: 100px auto 0;
    }
    .inner {
      width: 200px;
      height: 200px;
      background-color: red;
      /* 水平方向上扭曲，正值元素左上角和右下角拉扯，负值元素右上角和左下角拉扯 */
      /* transform: skewX(-35deg); */
      /* 垂直方向上扭曲，正值元素左上角和右下角拉扯，负值元素右上角和左下角拉扯 */
      transform: skewY(-35deg);
    }
    .menu {
      display: flex;
      width: 500px;
      justify-content: space-around;
      background-color: rgb(244, 228, 231);
    }
    .menu-item {
      width: 100px;
      height: 50px;
      position: relative;
    }
    .up {
      height: 25px;
      background-color: skyblue;
      transform: skewX(35deg);
    }
    .down {
      height: 25px;
      background-color: skyblue;
      transform: skewX(-35deg);
    }
    .text {
      position: absolute;
      width: 100%;
      height: 100%;
      text-align: center;
      line-height: 50px;
      left: 0;
      top: 0;
      color: aliceblue;
    }
  </style>
</head>
<body>
  <div class="outer">
    <div class="inner">hello world</div>
  </div>
  <div class="menu">
    <div class="menu-item">
      <div class="up"></div>
      <div class="down"></div>
      <div class="text">菜单1</div>
    </div>
    <div class="menu-item">
      <div class="up"></div>
      <div class="down"></div>
      <div class="text">菜单2</div>
    </div>
    <div class="menu-item">
      <div class="up"></div>
      <div class="down"></div>
      <div class="text">菜单3</div>
    </div>
  </div>
</body>
</html>
